using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace control1
{
    [Designer(typeof(TongJi_EMS._TJ_Basic.TJ_BasicControlDesigner))]
    public partial class UserControl1 : TongJi_EMS._TJ_Basic.TJ_BasicControl
    {
        private float x;
        private float y;

        public UserControl1()
        {
            this.InitializeComponent();
        }

        private void UserControl1_Load(object sender, EventArgs e)
        {
            this.UserControl1_Resize(sender, e);
        }

        private void UserControl1_Paint(object sender, PaintEventArgs e)
        {
            Pen pen = new Pen(Color.Red, 1);
            e.Graphics.DrawLine(pen, (float)(this.x * 0.1f), (float)0f, (float)(this.x * 0.1f), (float)(this.y * 1.9f));
            e.Graphics.DrawLine(pen, (float)(this.x * 0.1f), (float)(this.y * 1.9f), (float)(this.x * 1.9f), (float)(this.y * 1.9f));
            e.Graphics.DrawLine(pen, (float)(this.x * 1.9f), (float)(this.y * 1.9f), (float)(this.x * 1.9f), (float)0f);
        }

        private void UserControl1_Resize(object sender, EventArgs e)
        {
            this.x = base.Width / 2;
            this.y = base.Height / 2;
            //this.Refresh();
        }
    }
}